#! /bin/bash
[ ! -e /conda/envs/seg ] && conda create -n seg python=3.10 -y
echo conda seg det OK!
source activate seg
[ ! -e /root/code/mmsegmentation ] && git clone https://gitee.com/liuwake/mmsegmentation.git /root/code/mmsegmentation
cd /root/code/mmsegmentation
pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2 torchtext==0.15.2 \
    -f https://mirror.sjtu.edu.cn/pytorch-wheels/cu117/?mirror_intel_list \
    -f https://download.pytorch.org/whl/cu117/torch_stable.html
pip install -U openmim && mim install -e . "mmengine==0.10.2" "numpy~=1.26" ftfy regex cityscapesscripts